<?php
## include config & db info ##
include $_SERVER['DOCUMENT_ROOT']."/pos/lib/list.php";

## include HTML view header ##
include $_SERVER['DOCUMENT_ROOT']."/pos/lib/head_view.php";

## include SQL header ##
include $_SERVER['DOCUMENT_ROOT']."/pos/lib/array_sql.php";
?>

<body>
	<div style="width: 1024px; padding: 10px;">
		<div
			style="border-bottom: 1px solid #e8e8e8; text-align: left; font-size: 12px; margin-bottom: 12px; color: #9a9a9a">:::
			기본 설정&nbsp;⇒&nbsp;단품 바코드 인쇄 설정</div>

		<div style="float: right; padding: 5px;">
			<a href="javascript:customer_delete();" class="button red small">&nbsp;삭제하기&nbsp;</a>
			<a href="javascript:customer_modify();" class="button green small">&nbsp;수정하기&nbsp;</a>
			<a href="insert.php" class="button white small">&nbsp;입력하기&nbsp;</a>
		</div>
		<?
		/*$usercode	= $_POST['usercode'];
		 $name		= $_POST['name'];
		 
		$sear_char = "";
		if($usercode)	{ $sear_char .= " and usercode like '$usercode' ";	}
		if($name)		{ $sear_char .= " and name like '%$name%' ";	}

	 
		*/

		?>

		<form name="view" method="post" id="view">
			<input type="hidden" value="" name="mode" />
			<input type="hidden" name="page" value="" />
			<!-- input type="hidden" name="name" value="<=$name?>" /--->

			<table cellspacing="1" class="tablesorter">
				<thead>
					<tr align="center" >
						<th width="10px"><input
							onclick="if (this.checked) all_checked(true); else all_checked(false);"
							type=checkbox tabindex=1 name=chk_head />
						</th>
						<th width="30px">Idx</th>
						<th>Tag</th>
						<th>상품명</th>
						<th>넓이 / 사이즈</th>
						<th>단가</th>
						<th>넓이 / 사이즈</th>
						<th>부문</th>
						<th>넓이 / 사이즈</th>
						<th>비고</th>
						<th>넓이 / 사이즈</th>
					</tr>

				</thead>
				<tbody>					
					
				<?php
				$pagediv	= $_POST['page'];

				## 바코드 인쇄 설정 테이블
				#  uatp_customer
				$query	= sprintf(posSql('prtbar_info_view'), $sear_char, 'desc');//"select * from uatp_prtbar where 1 %s order by Idx %s";
				$total	= DBnumrows($query);

				## 페이지  출력하기(파라미터 : 한 페이지에 나타날 row 개수)
				$page = page_division(10,$total,$pagediv);	// 10개

				## 고객 마스터 테이블 페이지로 나누기
				$query	= sprintf(posSql('prtbar_info_view_page'),$sear_char, $page['cline'], $page['scale1']);//"select * from uatp_prtbar where 1 $sear_char order by no DESC LIMIT $cline, $scale1";
				$result	= DBquery($query);


				## 고객 마스터 테이블 출력
				for($i=1; $list = mysql_fetch_array($result); $i++){
					$bunho = $total - ( $i + $page['cline']) + 1;
					?>
					<tr <?=$MouseOver?> onclick="javascript:chk(<?=$list[Idx]?>)">
						<td><input type=checkbox name=chk_no[] value="<?=$list['Idx']?>" onclick="javascript:chk(<?=$list['Idx']?>)"></input></td>			
						<td><?=$list['Idx']?></td>			
						<td <?=$MouseOver?> onclick="javascript:movepage('detail.php','Idx','<?=$list['Idx']?>');"><b><?=$list['tag']?></td>					
						<td><?=$list['priname']?></td>
						<td><?=$list['wdtname']?>px X <?=$list['sizname']?></td>
						<td><?=$list['priprice']?></td>
						<td><?=$list['wdtprice']?>px X <?=$list['sizprice']?></td>
						<td><?=$list['pribumun']?></td>
						<td><?=$list['wdtbumun']?>px X <?=$list['sizbumun']?></td>
						<td><?=$list['prinote']?></td>
						<td><?=$list['wdtnote']?>px X <?=$list['siznote']?></td>
					</tr>
					
					
<?php 
}
?>
	</tbody>
		</table>
		<center>
			
<?php
page_avg($page['totalpage'],$page['cpage']);
?>
		</center>
		</form>
	</div>
</body>
</html>
<?	
	mysql_free_result($result);
	mysql_close();

?>
